﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using FairyGUI;

public class StartPanel : MonoBehaviour
{
    // Start is called before the first frame update
    private GComponent view;
    private GButton startButton;
    void Start()
    {
        UIPackage.AddPackage("Fairy/imcui");
        view = UIPackage.CreateObject("imcui", "startcom").asCom;
        GRoot.inst.AddChild(view);
        startButton = view.GetChild("startButton").asButton;
        Transition ts = view.GetTransition("swap");
        startButton.onClick.Add(()=> {
            ts.Play(() => {
                LoadingPanel.LoadSceneAsync("GameScene_1");
            });
        });
    }

    // Update is called once per frame
    void Update()
    { 
    }
}
